package org.example.v2.state;

import org.example.v2.OrderStateMachine;

/**
 * PaidStateAction 类表示订单的已支付状态。
 */
public class PaidState implements OrderState {
    @Override
    public void handle(OrderStateMachine context, String event) {
        if (event.equals("ship")) {
            context.setState(new ShippedState());
            System.out.println("订单已发货。");
        } else {
            System.out.println("当前状态下的无效事件。");
        }
    }
}